<template>
  <div id="app_huang">
      <div class="w1008 m0auto">
        <!-- 搜索框： -->
        <div>
            <p style="font-size: 0.388889rem;color: #333;font-weight:bold;padding: .462963rem 0;">
                在app内获得的礼物均可兑换，获得收益
            </p>
            <p class="fsC6" style="font-size: .388889rem;margin-top:.092593rem;">
                收益计算方式：
            </p>
            <p class="fsC6" style="font-size: .333333rem;margin-top:.092593rem;color:#666;">
                <span style="color:#333;">个人收益（元）</span> =个人礼物分成*30%+房费分成*8%
            </p>
            <p class="fsC6" style="font-size: .333333rem;margin-top:.092593rem;color:#666;"> <span style="color:#333;">家族收益（元）</span> =个人礼物分成*30%+房费分成*8%+家族分成*4%+主播分成*30%</p>
        </div>
        <div class="flex-dire-row fsC6" style="height: 1.203704rem;line-height: 1.203704rem;">
            <span style="font-size: .388889rem;font-weight: bold;color:#666;">具体分成比例：</span>
        </div>

        <div style="border:0.018519rem solid #ccc;border-radius: 0.185185rem;overflow: hidden;font-size: 0.333333rem;">
            <table border="0" width="100%;" style="border-radius: 0.185185rem;">
                <tr class="hei_s">
                    <td align="center" rowspan="2">
                        <span>个人礼物及房费所得（元）</span>
                    </td>
                    <td align="center" rowspan="2">
                        <span>个人礼物及房费所得（钻石）</span>
                    </td>
                    <td align="center" colspan="2">
                        <span>
		  		个人&家族积分结算
		  	</span>
                    </td>
                </tr>
                <tr class="hei_s">
                    <td align="center">个人</td>
                    <td align="center">家族长</td>
                </tr>
                <tr>
                    <td align="center" class="red_s">4000元</td>
                    <td align="center" class="red_s">400万</td>
                    <td align="center" class="hei_s">60%</td>
                    <td align="center" class="hei_s">6%</td>
                </tr>
                <tr>
                    <td align="center" class="red_s">4000元</td>
                    <td align="center" class="red_s">400万</td>
                    <td align="center" class="hei_s">60%</td>
                    <td align="center" class="hei_s">6%</td>
                </tr>
                <tr>
                    <td align="center" class="red_s">4000元</td>
                    <td align="center" class="red_s">400万</td>
                    <td align="center" class="hei_s">60%</td>
                    <td align="center" class="hei_s">6%</td>
                </tr>
                <tr>
                    <td align="center" class="red_s">4000元</td>
                    <td align="center" class="red_s">400万</td>
                    <td align="center" class="hei_s">60%</td>
                    <td align="center" class="hei_s">6%</td>
                </tr>
                <tr>
                    <td align="center" class="red_s">4000元</td>
                    <td align="center" class="red_s">400万</td>
                    <td align="center" class="hei_s">60%</td>
                    <td align="center" class="hei_s">6%</td>
                </tr>
                <tr>
                    <td align="center" class="red_s">4000元</td>
                    <td align="center" class="red_s">400万</td>
                    <td align="center" class="hei_s">60%</td>
                    <td align="center" class="hei_s">6%</td>
                </tr>
                <tr>
                    <td align="center" class="red_s">4000元</td>
                    <td align="center" class="red_s">400万</td>
                    <td align="center" class="hei_s">60%</td>
                    <td align="center" class="hei_s">6%</td>
                </tr>
                <tr>
                    <td colspan="4">
                        <div style="width: 100%;height: 2.453704rem;justify-content: space-around;color: #6b67f1;" class="flex-dire-column">
                            <span style="margin:0 0.277778rem;">
		 			房主补贴：日累计流水超过1000元的房间将获得流水的
8%的钻石奖励，并合计至当日所得再进行比例结算。
			 		</span>
                            <span style="margin:0 0.277778rem;">
			 			家族长提成：家族长由官方成本中划出。
			 		</span>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div style="margin-bottom: 1.388889rem;">
        </div>
        <a v-show="noshengqing === 0" id="sq_add" @click="addFamily" class="shengqing_join m0auto">
            <span>+</span>
            <span>申请加入</span>
        </a>
    </div>
  </div>
</template>

<script>
import getRequests from '../assets/js/common';
import { MessageBox,Toast } from 'mint-ui';
export default {
  data () {
    return {
      name:'shengqing_know',
      family_id:'',
      noshengqing:0
    }
  },
  mounted() {
      this.family_id = this.$route.params.familyId;
      this.noshengqing = this.$route.query.noshengqing || 0;        
  },
  methods:{
      addFamily(){
          MessageBox({
            title: '提示',
            message: '请，您确定申请加入这个家族?',
            showCancelButton: true
        }).then((res)=>{
            if(res === 'confirm'){
                this.https.post(getRequests.getRequests.joinFamily,{family_id:this.family_id}).then(res => {
                    console.log(res);
                    if(res.status === 200){
                        Toast({
                            message: res.msg,
                            position: 'bottom',
                            duration: 2000
                        });
                        this.$router.push({name:'applicationSuccess',params:{type:3}});
                    }else if(res.status ===400){
                        Toast({
                            message: res.msg,
                            position: 'bottom',
                            duration: 2000
                        });
                    }
                })
            }else if(res === 'cancel'){
                console.log('ccc')
            }
        })
      }
  }
}

</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
   .fsC6 {
            font-size: 0.388889rem;
            color: #666;
        }
        
        .shengqing_join {
            position: fixed;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 1.296296rem;
            line-height: 1.296296rem;
            background-color: #6b6cf1;
            text-align: center;
            font-size: 0.518519rem;
            color: #fff;
        }
        
        table tr {
            width: 100%;
            height: 0.87963rem;
        }
        
        table tr td {
            width: 2.407407rem;
            height: 0.87963rem;
        }
        
        .red_s {
            font-size: 0.333333rem;
            color: #ff4e1f;
        }
        
        .hei_s {
            color: #333333;
        }
</style>
